import Taro, { Component } from '@tarojs/taro'
import { View, Text } from '@tarojs/components'
import './illdescription.css'
import { AtSteps,AtTextarea,AtButton } from 'taro-ui'
import {$redirectTo} from '../../../global'
export default class IllDescription extends Component {

  config = {
    navigationBarTitleText: '快速问诊'
  }
  constructor () {
    super(...arguments)
    this.state = {
      current: 3,
      value: ''
    }
  }
  onChange (current) {
    this.setState({
      current
    })
  }
  handleChange (event) {
    this.setState({
      value: event.target.value
    })
  }
 wenti=()=>{
  app.redirectTo("../eyephoto.1/eyephoto")
 }
  componentWillMount () { }

  componentDidMount () { }

  componentWillUnmount () { }

  componentDidShow () { }

  componentDidHide () { }

  render () {
    const items = [
        { 'title': '' },
        { 'title': '' },
        { 'title': '' },
        { 'title': '' },
        { 'title': '' },
        { 'title': '' },
        { 'title': '' },
        { 'title': '' }
      ];
    return (
      <View className='ill-description'>
        <AtSteps
        className='steps'
        items={items}
        current={this.state.current}
        onChange={this.onChange.bind(this)}
      />
      <View className='title'>病情主诉</View>  
      <View className='tips'>
       请尽可能的描述你的病情症状、病情加重或缓解情况、曾经做过的检查、到院诊断结果、想要获得医生的什么帮助等
      </View>
      <View className='area'>
      <AtTextarea
        count={false}
        value={this.state.value}
        onChange={this.handleChange.bind(this)}
        maxLength={200}
        placeholder='请输入病情描述...'
        textOverflowForbidden={false}	
      />   
      </View>
      <View className='btn-box' onClick={this.wenti}><AtButton className='next-btn' full>下一步</AtButton></View>
      </View>
    )
  }
}

